package beanstao.util.type.base;

import java.lang.reflect.Array;

import net.sf.json.JSONArray;

import beanstao.util.exception.technical.util.reflect.FailToCastObjectException;
import beanstao.util.type.Castor;

public class Array2String extends Castor<Object, String>
{

	public Array2String()
	{
		this.fromClass = Array.class;
		this.toClass = String.class;
	}

	@Override
	public String cast(Object src, Class<?> toType, String... args) throws FailToCastObjectException
	{
		return JSONArray.fromObject(src).toString();
	}

}
